package main

import (
	"ginVueNew/controller"
	"ginVueNew/middleWare"
	"github.com/gin-gonic/gin"
)

func CollectRoute(r *gin.Engine) *gin.Engine{
	r.Use(middleWare.CORSMiddleware())
	r.POST("/api/auth/register",controller.Register)
	r.POST("/api/auth/login",controller.Login)
	r.GET("/api/auth/info",middleWare.AuthMiddleware(),controller.Info) //使用中间件保护用户信息接口
	return r
}
